home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pofo / sprachen / pbasic / pbas30 / pbasic.txt < prev    next >
Encoding:
Text File  |  1991-08-22  |  29.3 KB  |  1,013 lines

  1. Portfolio BASIC, version 3.0  (c) 1990 BJ Gleason
  2.  
  3. by BJ Gleason,  The American University
  4.  
  5.  
  6. INTRODUCTION
  7.  
  8.           PBASIC is a simple BASIC interpreter.  It only requires
  9.      33k of disk space and about 49k of memory to run.  PBASIC is
  10.      a batch oriented interpreter.  It will also interact with
  11.      the built-in editor for program development.
  12.  
  13.           PBASIC was one of the winners in the Compuserve/
  14.      Portfolio Conference Programming Contest, 1990.
  15.  
  16.  
  17. A NOTE FROM THE AUTHOR
  18.  
  19.           A number of considerate users have offered their help. 
  20.      If you have an interesting application that you have
  21.      developed in PBASIC, I will be more than happy to distribute
  22.      your code in future releases.  Please make sure to place
  23.      your name and other information as REMarks in the program. 
  24.      You can include a documentation file as well.  The only
  25.      thing that I ask is that you do not charge for the use of
  26.      your program, as I am not charging for the use of this
  27.      interpreter.  Send me a note, and tell me where the code is
  28.      and I will include it in the package.
  29.  
  30.           Thanks to all you have helped and are going to help!
  31.  
  32.  
  33. DESIGN CONSIDERATION
  34.  
  35.           When I was laying out the initial design of PBASIC,
  36.      here are some of the topics I took into consideration:
  37.  
  38.           - Microsoft BASIC compatible.
  39.           - Size of Interpreter (as small as possible).
  40.           - Unique features of the Portfolio.
  41.           - Using the Built-in editor for Program Editing.
  42.           - Reasonable size BASIC programs.
  43.  
  44.  
  45. NEW FEATURES FOR VERSION 3.0
  46.  
  47.      STRINGS!!!! and arrays of strings.
  48.      Two Dimensional Arrays.
  49.      Added many Sample Programs.
  50.      New Functions : ASC, DATE$, INSTR, INKEY$, VAL, LEFT$, MID$,
  51.           RIGHT$, CHR$, HEX$, OCT$, SPACE$, STR$, STRING$, TIME$,
  52.           PBVER
  53. INTERFACING WITH THE EDITOR
  54.  
  55.           Instead of trying to create an editor, PBASIC makes
  56.      full use of the built in editor.
  57.  
  58.           If you run BASIC without any parameters, it will load
  59.      the last file you used in the editor.  To speed up the
  60.      process, you might want to rename PBASIC.EXE to P.EXE, so
  61.      you only need to type P<RETURN> at the prompt.  You can also
  62.      specify a file to execute on the command line.
  63.  
  64.           Whenever an error is detected, an error message is
  65.      displayed, along with the line number.  Press any key and
  66.      PBASIC will invoke the built-in editor and point to the
  67.      error position.  This will only happen if the file you are
  68.      executing is the same as the one you are editing.  On other
  69.      systems, you will be returned to the DOS prompt.
  70.  
  71.           ALTR.COM is a small TSR program that will, only from
  72.      inside the editor, save the current file and invoke PBASIC. 
  73.      PBASIC.EXE should be rename P.EXE for the <ALT-R> command to
  74.      work.  ALTR takes up about 450 bytes.  It can be removed by
  75.      rebooting the machine.  It can only be loaded into memory
  76.      once.  The <ALT-R> command will only work inside the editor.
  77.  
  78.           When the program is finished, PBASIC will wait for a
  79.      keypress and then return you to the editor.
  80.  
  81.  
  82. RUNNING PBASIC
  83.  
  84.           There are two forms to execute PBASIC:
  85.  
  86.                PBASIC [-T]
  87.  
  88.                PBASIC filename.ext [-T]
  89.  
  90.           In the first form, the default file is the last one
  91.      edited in the built-in editor on the Portfolio.  The second
  92.      form loads and executes the specified file.  If you leave
  93.      off the extension, the default ".BAS" is added.
  94.  
  95.           If you have run the ALTR program before editing your
  96.      code, you can execute PBASIC by pressing <ALT-R>.
  97.  
  98.           The command line switch -T will turn on the trace
  99.      feature.  This is the same as putting TRON at the beginning
  100.      of you program.
  101.  
  102.  
  103. GENERAL
  104.  
  105.      Source code is standard ASCII format.
  106.  
  107.      Source code can be in upper or lower case.
  108.  
  109.      200 floating point variables.  Variable names can not exceed
  110.      8 characters in length.
  111.  
  112.      FOR/NEXT loops may be nested 10 deep.
  113.  
  114.      GOSUBs may be nested 10 deep.
  115.  
  116.      Line numbers are not required for each statement.  Only 100
  117.      line numbers are allowed.  They do not have to be in
  118.      sequence.  Line numbers can range from 0 to 99999.
  119.  
  120.      Multiple statements per line (:) is supported.
  121.  
  122.  
  123. DEVELOPING PROGRAMS WITH GWBASIC
  124.  
  125.           You can develop your programs on the PC with Microsoft
  126.      BASIC or QuickBASIC.  If using Microsoft BASIC, be sure to
  127.      save the file in ASCII format [ SAVE "myfile",A ] so that it
  128.      can be read by PBASIC.  
  129.  
  130.      Do NOT attempt to use the Portfolio statements on the PC.
  131.  
  132.           Starting with version 2.0, all variables are floating
  133.      point.  The statement DEFINT A-Z  will now generate a syntax
  134.      error in PBASIC, since it has not been implemented yet.  It
  135.      is no longer treated as a remark.
  136.  
  137.  
  138. MATH EXPRESSIONS
  139.  
  140.           Single precision math.  Parentheses supported. 
  141.      Standard operator evaluation.  Hexadecmial and Octal
  142.      constants are supported.
  143.  
  144.           - negation
  145.           ^ exponent
  146.           * multiply
  147.           / divide
  148.           % remainder (MOD)
  149.           \ integer division
  150.           + addition
  151.           - subtraction
  152.      
  153.  
  154. NOTES ON CONVENTIONS USED
  155.  
  156.      An expression (exp) can contain variables, constants.  When
  157.      a dummy exp is indicated, it is suggested that you use a
  158.      constant, i.e. POS(0).
  159.  
  160.      A variable name (varname) must be used when indicated.
  161.  
  162.      Unless otherwise noted, all parameters can be constants,
  163.      variables or equations.
  164.  
  165.      
  166. BASIC STATEMENTS
  167.  
  168.           I have tried to keep the syntax and semantics for the
  169.      statements as close to Microsoft BASIC as possible.  The
  170.      notes presented indicate exceptions.  There are some
  171.      statements included the are not from Microsoft.  They will
  172.      not run on GWBASIC.
  173.  
  174.  
  175.      CLS
  176.  
  177.                Clears the screen.
  178.  
  179.  
  180.      DATA      list of numbers/strings
  181.  
  182.                Allows for numbers to be stored inline.  Data
  183.                statements MUST have a line number.  Numbers are
  184.                separated by commas.  Data statements may be
  185.                located on any line of the program.  Strings must
  186.                be enclosed in quotes.
  187.  
  188.                     12 DATA 1,2,3,4,5,6
  189.  
  190.  
  191.      DEF SEG   = exp
  192.  
  193.                Assigns a segment address for direct memory
  194.                accessing via PEEK, POKE and CALL.
  195.  
  196.  
  197.      DIM       varname(size)[,varname(size)....]
  198.  
  199.                Creates a one dimensional array of single
  200.                precision floating point variables.  Arrays start
  201.                at 0.  Arrays are not initialized to a value. 
  202.                Arrays must be defined before they are used. 
  203.                Upper arrays bounds are not checked, arrays are
  204.                not allowed to go below 0.
  205.  
  206.  
  207.      END
  208.  
  209.                SYSTEM and END have the same effect.
  210.  
  211.  
  212.      FOR       varname = exp TO exp [STEP exp]
  213.  
  214.                You can not use an array element for varname.
  215.  
  216.  
  217.      FORMFEED
  218.  
  219.                Send a formfeed to the printer.  NOT GWBASIC.
  220.  
  221.  
  222.      GOSUB     line number
  223.  
  224.  
  225.      GOTO      line number
  226.  
  227.  
  228.      IF        exp THEN statement [ ELSE statement ]
  229.  
  230.  
  231.      INPUT     ["prompt" (,|;)] varname
  232.  
  233.                Read an integer from the keyboard.  Only one
  234.                variable is allowed per input.  If a comma (,)
  235.                separates the prompt string and the varname, no
  236.                question mark (?) will be printed.  If a semi-
  237.                colon (;) is used, the question mark will appear. 
  238.  
  239.  
  240.      LOCATE    row,col
  241.  
  242.                Move the cursor to row, col.
  243.  
  244.  
  245.      LPRINT    list of expressions
  246.  
  247.                Send output to printer.  See PRINT.
  248.  
  249.  
  250.      NEXT      [varname]
  251.  
  252.                You can not use an array element for varname.
  253.  
  254.  
  255.      ON        exp  GOTO  list of line numbers
  256.  
  257.  
  258.      ON        exp  GOSUB list of line numbers
  259.  
  260.  
  261.      OUT       port, exp
  262.  
  263.                Send value to the indicated port.
  264.  
  265.                
  266.      POKE      addr, exp
  267.  
  268.                Places value at SEG:addr.  SEG is set via the DEF
  269.                SEG statement.  NOTE: Due to the design of the
  270.                Portfolio, if you poke screen memory (DEF
  271.                SEG=&HB000), the value may not appear.  After you
  272.                poke, you should use the REFRESH statement to
  273.                update the screen.
  274.  
  275.  
  276.      PRINT     list of expressions
  277.  
  278.                List of Expressions can consist of strings,
  279.                variables, constants or expressions, separated by
  280.                the comma (,) or semi-colon (;) or a space ( ).
  281.  
  282.  
  283.      PRINTER   
  284.  
  285.                This is a toggle to start copying all PRINT
  286.                statements to the printer.  Issue it again and it
  287.                will toggle off.  Can be used instead of
  288.                converting all PRINTs to LPRINTs.  Information
  289.                will still be displayed on the screen.  This will
  290.                not wrap the output lines like the screen will. 
  291.                NOT GWBASIC.
  292.  
  293.  
  294.      PRTSC
  295.  
  296.                This invoke the PRINT SCREEN function to copy the
  297.                screen out to the printer.  If you are using a
  298.                laser printer, you might want to use a FORMFEED
  299.                after this to do a page eject.  NOT GWBASIC.
  300.  
  301.  
  302.      PSET      (row, col) [, exp]
  303.  
  304.                Set the pixel at row, col to exp.  The Portfolio,
  305.                regardless of the screen mode, has a maximum
  306.                64x240 for row, col.  Exp can evaluate to 0 or 1.
  307.  
  308.  
  309.      RANDOMIZE
  310.  
  311.                Initialize the random number generator.
  312.  
  313.      READ      list of variables
  314.  
  315.                Read the values of the variables from the DATA
  316.                statements.  Variables can be simple or array.
  317.  
  318.  
  319.      REM
  320.  
  321.                Remark.  The rest of the line is ignored.  You can
  322.                also use the quote (') mark as a REM statement.
  323.  
  324.  
  325.      RESTORE   [line number]
  326.  
  327.                Sets the internal data pointer to the specified
  328.                line number.  Line number specified must be a data
  329.                statement.  If no line number is given, the data
  330.                pointer will point back to the first data
  331.                location.
  332.  
  333.  
  334.      RETURN
  335.  
  336.  
  337.      SCREEN    exp
  338.  
  339.                Set the screen mode.  There is no testing for
  340.                validity.  Some of the values that work on the
  341.                Portfolio are:
  342.  
  343.                      4   graphics  320x200
  344.                      5   graphics  320x200
  345.                      6   graphics  640x200
  346.                      7   text      80x25
  347.                      8   graphics  160x200
  348.                     10   graphics  640x200
  349.  
  350.                These are standard PC modes, but remember that the
  351.                Portfolio Screen is only 240x64.
  352.  
  353.                If you use the screen function of the portfolio,
  354.                it is highly recommend that you set the screen
  355.                back to mode 7 before you exit.  Many portfolio
  356.                utilities only work in mode 7.
  357.  
  358.                At present, text will not be displayed properly on
  359.                a graphics screen.
  360.  
  361.  
  362.      STOP
  363.  
  364.                To allow for "breakpoints", STOP will terminate
  365.                the program and display the line number.  It will
  366.                point the built-in editor to the last position
  367.                executed if the editor file is the same as the
  368.                file being executed.
  369.  
  370.  
  371.      SWAP      varname, varname
  372.  
  373.  
  374.      SYSTEM
  375.  
  376.                END and SYSTEM have the same effect.
  377.  
  378.  
  379.      TROFF
  380.  
  381.                Disable line tracing.
  382.  
  383.  
  384.      TRON
  385.  
  386.                Enable line tracing.  Will display the line number
  387.                in brackets ([x]).  Using this statement will slow
  388.                down the program execution.  Can be placed
  389.                anywhere in program.
  390.  
  391.  
  392.      WAIT
  393.  
  394.                Unlike the GWBASIC version, this only waits for a
  395.                key press.  It gives no prompt and returns no
  396.                value.
  397.  
  398.  
  399. BASIC FUNCTIONS
  400.  
  401.           I have tried to keep the syntax and semantics for the
  402.      functions as close to Microsoft BASIC as possible.  The
  403.      notes presented indicate exceptions.
  404.  
  405.  
  406.      ABS(exp)
  407.  
  408.                Returns the absolute value of exp.
  409.  
  410.  
  411.      ASC(x$)
  412.  
  413.                Returns the ASCII value of the first character in
  414.                x$.
  415.  
  416.  
  417.      ATN(exp)
  418.  
  419.                Returns the Arc Tangent of exp.
  420.  
  421.  
  422.      CHR$(n)
  423.  
  424.                Returns the ASCII character of the value n.
  425.  
  426.  
  427.      COS(exp)
  428.  
  429.                Returns the Cosine of exp.
  430.  
  431.  
  432.      CSRLIN
  433.  
  434.                Returns the current cursor line.
  435.  
  436.  
  437.      DATE$     
  438.  
  439.                Returns the system date.
  440.  
  441.  
  442.      EXP(exp)
  443.  
  444.                Returns e to the power of exp.
  445.  
  446.  
  447.      FIX(exp)
  448.  
  449.                Returns the integer portion of exp.
  450.  
  451.  
  452.      FRE(exp)
  453.  
  454.                Returns the free amount of memory.  The parameter
  455.                exp is a dummy expression.
  456.  
  457.  
  458.      HEX$(n)
  459.  
  460.                Converts n to a hexidecmial string.
  461.  
  462.  
  463.      INKEY$
  464.  
  465.                If a key is pressed, the character is returned,
  466.                otherwise, the empty string ("") is returned.
  467.  
  468.  
  469.      INP(port)
  470.  
  471.                Returns the byte value from port.
  472.  
  473.  
  474.      INSTR(x$,y$)
  475.  
  476.                Returns the position of y$ in x$.
  477.  
  478.  
  479.      INT(exp)
  480.  
  481.                Returns the integer portion of exp.
  482.  
  483.  
  484.      LEFT$(x$,n)
  485.  
  486.                Returns the leftmost n characters of x$.
  487.  
  488.  
  489.      LOG(exp)
  490.  
  491.                Returns the LOG of exp.
  492.  
  493.  
  494.      LPOS(exp)
  495.  
  496.                Returns the current position of the line printer
  497.                head.  Exp is a dummy expression.
  498.  
  499.  
  500.      MID$(x$,n,m)
  501.  
  502.                Returns a string from x$, starting at position n
  503.                for m characters.
  504.  
  505.  
  506.      OCT$(n)
  507.  
  508.                Converts n to an Octal string.
  509.  
  510.  
  511.      PBVER
  512.  
  513.                Returns the version number of PBASIC.
  514.  
  515.  
  516.      PEEK(address)
  517.  
  518.                Returns the byte from memory location SEG:address. 
  519.                SEG is set via the DEF SEG instruction.
  520.  
  521.      POINT(row,col)
  522.  
  523.                Returns the value of the pixel at row,col.  If
  524.                this function does not appear to work, try running
  525.                FIX0D, to fix the ROM pixel read function.
  526.  
  527.  
  528.      POS(exp)
  529.  
  530.                Returns the current cursor column.  Exp is a dummy
  531.                expression.
  532.  
  533.  
  534.      RAND(exp)
  535.  
  536.                This will return a number between 0 and exp-1. 
  537.                NOT GWBASIC.
  538.  
  539.  
  540.      RIGHT$(x$,n)
  541.  
  542.                Returns the rightmost n characters from x$.
  543.  
  544.  
  545.      RND
  546.  
  547.                This will return an number between 0 and 1.
  548.  
  549.  
  550.      SGN(exp)
  551.  
  552.                Returns the sign of exp.
  553.  
  554.                     -1   exp < 0
  555.                      0   exp = 0
  556.                      1   exp > 0
  557.  
  558.  
  559.      SIN(exp)
  560.  
  561.                Returns the Sine of exp.
  562.  
  563.  
  564.      SPACE$(n)
  565.  
  566.                Returns a string of n spaces.
  567.  
  568.  
  569.      SQR(exp)
  570.  
  571.                Returns the Square Root of exp.
  572.  
  573.      STR$(n)
  574.  
  575.                Returns the string representation of n.
  576.  
  577.  
  578.      STRING$(n,m)
  579.  
  580.                Returns a string composed of n characters.  The
  581.                ASCII value of the character is m. 
  582.  
  583.  
  584.      TAN(exp)
  585.  
  586.                Returns the Tangent of exp.
  587.  
  588.  
  589.      TIME$
  590.  
  591.                Returns the system time.
  592.  
  593.  
  594.      TIMER
  595.  
  596.                Returns the number of seconds since midnight.
  597.  
  598.  
  599.      VAL(x$)
  600.  
  601.                Returns the numeric value of x$.
  602.  
  603.  
  604. PORTFOLIO ONLY STATEMENTS
  605.  
  606.           The statements in this section are specific to the
  607.      Atari Portfolio and will not run on a regular PC.  YOU CAN
  608.      LOCK UP YOUR REGULAR PC IF YOU ATTEMPT TO USE THESE.
  609.  
  610.  
  611.      ALARM
  612.  
  613.                This will beep the speaker, about once a second
  614.                until the user presses a key.  The program will
  615.                then continue with the next statement.
  616.  
  617.  
  618.      BEEP
  619.  
  620.                This will cause a single beep from the speaker.
  621.  
  622.  
  623.      BOX       row1, col1, row2, col2, type
  624.  
  625.                This will draw a box.  Row1 and Col1 specify the
  626.                upper left corner position of the box, while Row2
  627.                and Col2 specify the lower right corner.  Type is
  628.                0 for single line box, and 1 for a double line
  629.                box.
  630.  
  631.                Trying to draw a box larger than the screen (8x40)
  632.                has unpredictable results.
  633.  
  634.  
  635.      CLICK
  636.  
  637.                Make the key click sound.
  638.  
  639.  
  640.      DIAL      string
  641.  
  642.                This will dial the "number" through the speaker. 
  643.                Valid characters for tones are: 0 1 2 3 4 5 6 7 8
  644.                9 A B C D * #.  The letters must be in uppercase.
  645.  
  646.  
  647.      DISPLAY   exp
  648.  
  649.                Set the Portfolio screen to Normal, Static or
  650.                Tracked.  0=Static, 1=Normal, 2=Tracked.  The mode
  651.                is only effective while in PBASIC.  Using this
  652.                statement might clear the screen depending on the
  653.                position of the cursor.
  654.  
  655.  
  656.      ERRWIN    row, col, "message"
  657.  
  658.                This will draw a box around the message and
  659.                display it at the specified row, col.  It will
  660.                then beep and wait for a keypress.  The text
  661.                underneath the message is left untouched.
  662.  
  663.                Trying to place the message outside the screen
  664.                (8x40) has unpredictable results.
  665.  
  666.  
  667.      GETDISPLAY
  668.  
  669.                This function will return the current display
  670.                mode.  See DISPLAY for details.
  671.  
  672.  
  673.      OFF
  674.  
  675.                This will turn the Portfolio off until the user
  676.                presses a key.  The program will continue
  677.                execution with the next statement.
  678.  
  679.  
  680.      PORT
  681.  
  682.                This function will return a 1 if running on a
  683.                Portfolio, a 0 if not.  Handy if you want to run
  684.                program on both machines without locking up the
  685.                PC.  WARNING: There is no positive way to identify
  686.                the Portfolio.  This functions checks to see if
  687.                the Interrupt 61h vector is pointing to 0000:0000. 
  688.                This is not normally used on the PC, but is on the
  689.                Portfolio.  If you are running a TSR that takes
  690.                over this vector, PORT will return 1.
  691.  
  692.  
  693.      REFRESH
  694.  
  695.                Copy video memory to the LCD controller.  Needed
  696.                for when you are doing direct write to screen
  697.                memory.
  698.  
  699.  
  700.      ROMVER
  701.  
  702.                This function will return the version number of
  703.                the Portfolio rom's.
  704.  
  705.  
  706.      SOUND     code, duration
  707.  
  708.                This will activate the tone generator.  Duration
  709.                is the length of tone in 10 msec intervals.  Tone
  710.                codes are displayed below.  These codes are taken
  711.                from the Atari Portfolio Technical Reference
  712.                Manual, copyrighted by the Atari Corporation.
  713.  
  714.                CODE      NOTE      Frequency (Hz)
  715.  
  716.                48        D#5       622.3
  717.                49        E5        659.3
  718.                50        F5        698.5
  719.                51        F#5       740.0
  720.                52        G5        784.0
  721.                53        G#5       830.6
  722.                54        A5        880.0
  723.                55        A#5       932.3
  724.                56        B5        987.8
  725.                57        C6        1046.5
  726.                58        C#6       1108.7
  727.                41        D6        1174.7
  728.                59        D#6       1244.5
  729.                60        E6        1318.5
  730.                61        F6        1396.9
  731.                14        F#6       1480.0
  732.                62        G6        1568.0
  733.                44        G#6       1661.2
  734.                63        A6        1760.0
  735.                 4        A#6       1864.7
  736.                 5        B6        1975.5
  737.                37        C7        2093.0
  738.                47        C#7       2217.5
  739.                 6        D7        2349.3
  740.                 7        D#7       2489.0
  741.  
  742.                Aside from these codes, other values will produce
  743.                sounds as well.
  744.  
  745.  
  746.      STATUS    exp
  747.  
  748.                This will enable or disable the Status line.  This
  749.                is the line that you see when you use the <LOCK>
  750.                key on the Portfolio.  0 for off, 1 for on.
  751.  
  752.  
  753.      TICK      exp
  754.  
  755.                Sets the Clock tick speed.  0 is Normal, 1 tick
  756.                every 128 seconds.  1 is Fast, 1 tick every
  757.                second.  1 uses much more power.
  758.  
  759.  
  760.      VCSRLIN
  761.  
  762.                Returns the current virtual cursor line.
  763.  
  764.  
  765.      VLOCATE   row,col
  766.  
  767.                Move the virtual cursor to row, col.  This
  768.                location will be at position 1,1 on the physical
  769.                screen.
  770.  
  771.  
  772.      VMOVE     dir, dis
  773.  
  774.                Move the screen in direction dir for dis number of
  775.                lines.  Works only in Static and Tracked modes. 
  776.                Same as using the ALT arrow keys.  Values for dir
  777.                are 1=Up,2=Down,3=Left,4=Right.
  778.  
  779.  
  780.      VPOS(exp)
  781.                Returns the current virtual cursor column.  Exp is
  782.                a dummy expression.
  783.  
  784.  
  785. UPGRADE HISTORY
  786.  
  787.      Version 3.0    November 25, 1990.
  788.  
  789.           Added sample programs.
  790.           Complied with Turbo C, version 2.0.
  791.           Added Help file for Portfolio Address Function.
  792.           Two Dimensional Arrays.
  793.           Expanded TEST.BAS to TEST30.BAS with strings.
  794.           TEST30.BAS - 17.0 seconds
  795.           TEST21.BAS - 10.4 seconds
  796.           New Functions: PBVER
  797.  
  798.  
  799.      Version 2.9    Beta Release - September 30, 1990.
  800.  
  801.           Added Strings.
  802.           Modified READ, SWAP and DIAL to handle strings.
  803.           Added STRING arrays.
  804.           Modified IF and PRINT to work with string expressions.
  805.           Fixed PRINT" problem. 
  806.           Allow line numbers directly after THEN or ELSE.
  807.           Now allows two dimensional arrays of any type.
  808.           Converted to Turbo C++, Version 1.0.
  809.           New Functions : ASC, DATE$, INSTR, INKEY$, VAL, LEFT$,
  810.                MID$, RIGHT$, CHR$, HEX$, OCT$, SPACE$, STR$,
  811.                STRING$, TIME$
  812.  
  813.  
  814.      Version 2.2    Not Released.
  815.  
  816.           Added hashing feature to symbol table to speed up
  817.                variable table access.  10% increase in TEST.
  818.           Added automatic default extension of ".BAS"
  819.  
  820.  
  821.      Version 2.1    August 4, 1990
  822.  
  823.           New Statements: DATA, READ, RESTORE
  824.           New Functions : LOG
  825.           TRON invoked from command line switch -T
  826.           Adjusted the screen coordinates from 0,0 to 1,1 to
  827.                match GWBASIC.  While this will cause some
  828.                incompatibilities with previous versions of
  829.                PBASIC, it will make it more compatible with
  830.                GWBASIC.
  831.           Added INP to the documentation.
  832.           Added FRE to the documentation.
  833.           Installed Binary search for command checking.  Speed
  834.                increase about 40%.
  835.           One letter variable names are not checked in command
  836.                table.
  837.           Fixed the load routine to allow for no CR/LF at the end
  838.                of the file.
  839.           Fixed FIX function.
  840.           Fixed scientific constants.
  841.           Fixed power (^) function.
  842.  
  843.  
  844.      Version 2.0    July 27, 1990
  845.  
  846.           New Statements: LPRINT, PRINTER, FORMFEED, PRTSC, WAIT,
  847.                OUT, DIM
  848.           New Functions : LPOS, ATN, EXP, FIX, INT, COS, SIN,
  849.                SQR, TAN, TIMER, \, INP, FRE
  850.           New Portfolio Only : GETDISPLAY, DISPLAY, VLOCATE,
  851.                VMOVE, VPOS, VCSRLIN, ROMVER, PORT
  852.           200 variables, 8 significant characters.
  853.           <ALT-R> TSR to invoke BASIC from inside editor.
  854.           Program size limited to available memory.
  855.           All variables are now SINGLE PRECISION FLOATING POINT.
  856.           One Dimensional Floating Point Arrays.
  857.           Fixed FOR/NEXT looping with a negative step.
  858.           Fixed the use of FUNCTIONS in PRINT statements.
  859.           Fixed EOF error on Portfolio: Lockup if no END
  860.                statement.
  861.           Added extensive printer support.
  862.           DEFINT will now cause a syntax error.
  863.           RND was changed to make it MS compatible.
  864.           SWAP was make array compatible.
  865.           Fixed ... else "string" problem.
  866.           Added NEXT to the documentation.
  867.  
  868.  
  869.      Version 1.1    July 21, 1990
  870.  
  871.           New Statements: DEF SEG, POKE
  872.           New Functions : PEEK
  873.           New Portfolio Only : REFRESH, TICK, CLICK, STATUS
  874.           Automatically invoke Editor on Error.
  875.           Fixed ALARM problem: keystroke was going into buffer.
  876.           Fixed ON x GOTO/GOSUB problem: Offset line count by 1.
  877.           Improved Error Detection.
  878.           Allow REM in PRINT with preceding colon (:).
  879.           Implement the quote (') as a substitute for REM.
  880.           Fix PSET documentation to indicate ()'s.
  881.           Screen mode changes, return to original on error.
  882.           Allow for spaces as separator in PRINT.
  883.  
  884.      Version 1.0    July 14, 1990
  885.           Initial release.
  886.  
  887.  
  888. TECHNICAL NOTES
  889.  
  890.           PBASIC is about 2500 lines of code was written in Turbo
  891.      C, version 2.0, compiled to an executable file just under
  892.      50k in size.  PBASIC was then compressed with LZEXE, version
  893.      0.91, to further reduce the size to about 33k.
  894.  
  895.           PBASIC will run on a regular PC, providing you do not
  896.      use any Portfolio specific statements.  If you have the
  897.      Portfolio Emulation software (I60, I61), you can use all the
  898.      features.
  899.  
  900.           PBASIC was developed on a Gateway 2000, 33Mhz 386 PC
  901.      with 4meg of memory.  It was tested on the Atari Portfolio,
  902.      ROM version 1.052.
  903.  
  904.  
  905. BATCH CONSIDERATIONS
  906.  
  907.           If you are running PBASIC as a batch file, you can
  908.      access the ERRORLEVEL code generated upon exit.
  909.  
  910.                0 - Successful exit
  911.                1 - Program aborted
  912.                2 - STOP encountered
  913.  
  914.  
  915. FUTURE ENHANCEMENTS
  916.  
  917.      - A much better manual (about Christmas time)
  918.      - Files
  919.      - Menus
  920.      - CHAINing programs 
  921.      - Increase compatibility with Microsoft BASIC
  922.  
  923.  
  924. THE FILES
  925.  
  926.      PBASIC.EXE     The Interpreter.
  927.      PBASIC.TXT     This file.
  928.      PBASIC.ADR     Help file to be loaded into the Address book
  929.                          on the Portfolio.
  930.      ALTR.COM       TSR to execute PBASIC from editor.
  931.      TEST.BAS       A program to exercise the interpreter. 
  932.                          Should not generate any errors.  It will
  933.                          run on a PC or Portfolio.  Take a look
  934.                          at it, it demos many of the features of
  935.                          the Portfolio Only routines.
  936.      C.BAT          Calculate Expression from DOS.  Invokes
  937.                          PBASIC.EXE to display answer.
  938.                     Example: C 123*(567+9845)/18
  939.  
  940.      Sample PBASIC programs
  941.      100DAYS.BAS    Calculate 100 days after a date.
  942.      2CURVE.BAS     Graph Plot program.  Written by Rob Kunstadt.
  943.      ADDTIME.BAS    Program to add up time in Minutes and
  944.                          Seconds.  Written by Louis Shapiro.
  945.      BAR.BAS        Bar Chart program.  Written by Rob Kunstadt.
  946.      CHART.BAS      Chart hours worked.  Written by Rob Kunstadt.
  947.      CIRCLE.BAS     Demo of Circle Drawing Subroutine.
  948.      DAYS.BAS       Calc the number of days between two dates.
  949.      ETCH.BAS       Simple Drawing Program.
  950.      REV.BAS        Game of Reverse.
  951.  
  952.      The MUSIC Files by John Fraser
  953.      BACH1.BAS      BACH2.BAS      BETH2.BAS
  954.      BDAY.BAS       KRIEGER.BAS    PETER1.BAS
  955.      MUSIC.TXT      Notes from the author.
  956.  
  957.      Utilities
  958.      FIX0D.COM           TSR fix for Portfolio graphics rom.
  959.      FIX0D.TXT 
  960.  
  961.  
  962. ABOUT THE AUTHOR
  963.  
  964.      Mr. BJ Gleason is an Instructor at The American University
  965.      in the Computer Science and Information Systems Department. 
  966.      He has been programming for over a decade now.
  967.  
  968.  
  969. COMMENTS, BUGS AND IDEAS
  970.  
  971.           What features do you really need in PBASIC to make it
  972.      more useful on the Portfolio?  If you would like to see some
  973.      new features, contact me and I will try to accommodate you
  974.      and release a new version.
  975.  
  976.  
  977. ACKNOWLEDGEMENTS
  978.  
  979.           Thanks to all those Compuserve for their bug reports,
  980.      suggestions and words of encouragement.  Without their
  981.      feedback, version 3.0 would have never seen the light of
  982.      day.  Keep those cards and letters coming!
  983.  
  984.           The author would also like to extend his thanks to
  985.      Walter Daniels, for helping me track down the ever-elusive
  986.      bugs, and putting up with a flaky copy of version 2.9.
  987.  
  988.  
  989. ADDRESS
  990.  
  991.           If you have an comments, suggestions or bug reports,
  992.      you can write to the author at:
  993.  
  994.  
  995.           BJ Gleason
  996.           The American University
  997.           CSIS  (Thin Air Labs)
  998.           4400 Massachusetts Avenue, N.W.
  999.           Washington, DC  20016
  1000.  
  1001.           Compuserve : 73337,2011
  1002.  
  1003.      
  1004.           This program and documentation is being placed into the
  1005.      public domain by the author.  It can be copied and
  1006.      distributed freely.  It can not be sold or used for
  1007.      commercial purposes without permission.
  1008.  
  1009.      PBASIC version 3.0, Copyright 1990 by BJ Gleason.
  1010.  
  1011.      Portfolio, Atari, Microsoft, GWBASIC are trademarks of their
  1012.      respective companies.
  1013. ə